package jcurses.widgets;

public interface IFocusable {

	/**
	 * The method is called bei <code>setFocus</code> to tell widget, thas it
	 * has get focus. This method schold be overrided bei derived class to react
	 * getting focus, for examlple to repaint widget gettig focus.
	 */
	void getFocus();

	/**
	 * @return true, if the widget has currenty focus,that is handles input, in
	 *         othe case false
	 */
	boolean hasFocus();

	boolean isFocusable();

	/**
	 * The method is called bei <code>setFocus</code> to tell widget, thas it
	 * has lost focus. This method schold be overrided bei derived class to
	 * react losing focus, for examlple to repaint widget losing focus.
	 */
	void lostFocus();

	/**
	 * The method is called by framework if focus is switched,that is, either
	 * the widget has get or lost focus.
	 * 
	 * @param value
	 *            true, if the widget has get focus, in other case false
	 */
	void setFocus(boolean value);

	void setFocusable(boolean focusable);

}
